package cn.com.db.service;

import cn.com.db.model.Taste;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class TasteService extends BaseService {

    public Boolean isExist(String id){
        return getTasteById(id)!=null;
    }

    public Taste getTasteById(String id){
        return tasteDao.getTasteById(id);
    }

    public void createTaste(Taste Taste){
        tasteDao.createTaste(Taste);
    }

    public List<Taste> getTaste(){
        return tasteDao.getTaste();
    }

    public Integer countTaste(){
        return tasteDao.countTaste();
    }

    @Transactional
    public void updateTaste(Taste Taste){
        tasteDao.update(Taste);
    }


}
